define
(
    function()
    {
        return function(userName, sessionId)
        {
            var _userName = userName;
            var _sessionId = sessionId;

            this.getUserName = function() {return _userName};
            this.getSessionId = function() {return _sessionId};

            this.toJSON = function()
            {
                return {userName: _userName, sessionId: _sessionId};
            }
        };
    }
);